package com.zzuli.dcxt.service.impl;

import com.zzuli.dcxt.dao.DishesMapper;
import com.zzuli.dcxt.entiy.Dishes;
import com.zzuli.dcxt.service.DishesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DishesServiceImpl implements DishesService {
    @Autowired
    private DishesMapper dishesMapper;
    @Override
    public List<Dishes> selectAll() {
        return dishesMapper.selectAll();
    }

    @Override
    public void addDishes(Dishes dishes) {
        dishesMapper.add(dishes);
    }

    @Override
    public Dishes selectOne(int id) {
        return dishesMapper.selectOne(id);
    }

    @Override
    public void update(Dishes dishes) {
        dishesMapper.update(dishes);
    }

    @Override
    public void delete(int id) {
        dishesMapper.delete(id);
    }
}
